﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Tssipl.PaymentAdapter.Core;
using Tssipl.PaymentAdapter.MessageFormat.Sfms;
namespace Tssipl.PaymentAdapter.MessageEntity.Sfms.Neft
{

    public class NeftNilTransactionOrNilRejection : Tssipl.PaymentAdapter.MessageEntity.Sfms.SfmsMessageEntityBase
    {
        public string TRN { get; set; }//16x //M
        public string BankGatewayIFSC { get; set; }//4!a4!c[3!c]  //M
        public string TransactionDate { get; set; }//8!n   //M
        public string MessageText { get; set; }//2!a    //M

        public NeftNilTransactionOrNilRejection(MessageParseResults results)
            : base(results)
        {
            SfmsMessage message = (SfmsMessage)results.getMessage();
            SfmsBlock4 block4 = message.getBlock4();
            
            this.TRN = block4.getField("2020").Trim();
            this.BankGatewayIFSC = block4.getField("6712");
            this.TransactionDate = block4.getField("3385");
            this.MessageText = block4.getField("6312");
        }
    }
}
